package com.shanwen.select.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shanwen.select.entity.AdminUser;
import com.shanwen.select.entity.Menu;
import com.shanwen.select.mapper.MenuMapper;
import com.shanwen.select.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {
    @Autowired
    MenuMapper menuMapper;

    @Override
    public List<String> getPermissions(AdminUser adminUser) {
        //
        return menuMapper.getPermissions(adminUser);
    }

    @Override
    public List<Menu> getMenuList(Integer roleId) {
        return menuMapper.getMenuList(roleId);
    }

    @Override
    public List<Menu> getRoleMenuList(Integer roleId) {
        return menuMapper.getRoleMenuList(roleId);
    }
}